let john = {name: "John", surname: "Smith", id: 1};

let pete = {name: "Pete", surname: "Hunt", id: 2};

let mary = {name: "Mary", surname: "Key", id: 3};

let users = [john, pete, mary];

let usersMapped = users.map(function(item, index, array){
    let tmp = {fullName: item.name + ' ' + item.surname, id: item.id};
    return tmp;
});

let usersMappedArrowFunc = users.map(user => ({fullName: user.name + ' ' + user.surname, id: user.id}));

alert(usersMappedArrowFunc[0].id);

alert(usersMappedArrowFunc[0].fullName);